package io.persimmon.core.module.trace;

import org.slf4j.Logger;

public class Trace {
    public static void log(TraceInfo traceInfo) {
        TraceManager.currentTraces().forEach(trace -> trace.addTraceInfo(traceInfo));
    }

    public static void log(Logger logger, String msg, Object... args) {
        TraceInfo traceInfo = new TraceInfo(logger, msg, args);
        log(traceInfo);
    }

    public static void log(String msg, Object... args) {
        TraceInfo traceInfo = new TraceInfo(null, msg, args);
        log(traceInfo);
    }
}
